home *** CD-ROM | disk | FTP | other *** search
/ Aminet 50 / Aminet 50 (2002)(GTI - Schatztruhe)[!][Aug 2002].iso / Aminet / text / edit / tecoc-146.lha / execte.c < prev    next >
C/C++ Source or Header  |  1991-07-05  |  1KB  |  38 lines

  1. /*****************************************************************************
  2.  
  3.     ExeCtE()
  4.  
  5.     This function executes a ^E (control-E or caret-E) command,  which
  6. returns the value of the form feed flag.  The form feed flag is -1 if the
  7. last read operation was terminated because a form feed was encountered.  It
  8. is 0 otherwise.  If the ^E command is preceded by a numeric argument, then
  9. the command sets the value of the form feed flag.  The form feed flag is
  10. used by the output code to indicate whether a form feed should be appended
  11. when the edit buffer is written to the output file.
  12.  
  13. *****************************************************************************/
  14.  
  15. #include "zport.h"        /* define portability identifiers */
  16. #include "tecoc.h"        /* define general identifiers */
  17. #include "defext.h"        /* define external global variables */
  18.  
  19. DEFAULT ExeCtE()        /* execute a ^E (control-E) command */
  20. {
  21.     DBGFEN(1,"ExeCtE",NULL);
  22.  
  23.    if (EStTop > EStBot) {            /* if numeric argument */
  24.     if (GetNmA() == FAILURE) {        /* get numeric arg */
  25.         DBGFEX(1,DbgFNm,"FAILURE");
  26.         return FAILURE;
  27.     }
  28.     FFPage = (NArgmt == -1) ? -1 : 0;
  29.     CmdMod = '\0';                /* clear modifiers flags */
  30.     DBGFEX(1,DbgFNm,"SUCCESS");
  31.     return SUCCESS;
  32.     }
  33.  
  34.     CmdMod = '\0';                /* clear modifiers flags */
  35.     DBGFEX(1,DbgFNm,"PushEx(FFPage)");
  36.     return PushEx(FFPage, OPERAND);
  37. }
  38.